home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-05 / lstn1-5.zip / LS-1.TXT < prev    next >
Text File  |  1991-10-03  |  14KB  |  430 lines

  1. Hayes(r) Microcomputer Products, Inc.    LANstep(r) Technical Note
  2.  
  3.                                     "Creating a DOS Startup Script
  4.                                          for a LANstep Workstation"
  5.  
  6. Number LS-1                                         September 1991
  7.  
  8. Summary:
  9.  
  10. This Technical Note explains how a Super_User can create a startup
  11. script for a LANstep Workstation user that bypasses the LANstep
  12. "office" screen and automatically:
  13.  
  14.  
  15. * loads a user's most frequently used or menuing application
  16.   immediately after log-in, or
  17.  
  18. * starts a user in DOS at a mapped drive location.
  19.  
  20. This Technical Note is applicable for LANstep version 1.0x.
  21.  
  22.  
  23. Some Questions Answered
  24.  
  25. This section outlines in brief what can be accomplished with
  26. a DOS startup script, why it might be useful, who should do it, and,
  27. the basics of how it is done. Further sections go into detail on each
  28. part of the process
  29.  
  30.  
  31. Why
  32.  
  33. A LANstep Workstation boots (starts up) using LANstep as the
  34. underlying operating system, and then a user must manually select a
  35. DOS program for use. This script automates those steps. This is helpful on
  36. systems where menu-type programs are in use and need to be automatically
  37. executed after log-in.
  38.  
  39.  
  40. Who
  41.  
  42. Since this procedure involves entering the Support room, only a Super_User
  43. who is familiar with user setups and commands such as NETUSE should
  44. attempt to create a startup script. Keep in mind that startup scripts must
  45. be created for each user that needs one.
  46.  
  47.  
  48. How
  49.  
  50. First, you'll create a single line start-up script that
  51. loads DOS after a valid login. When DOS loads, (typically from the E:
  52. drive) AUTOEXEC.BAT (the same for all users) runs, and moves to a
  53. user's personal directory (usually G: drive). From there,
  54. AUTOEXEC.BAT ends by executing a second batch file (START.BAT)
  55. located in an individual user's personal directory. START.BAT uses
  56. the NETUSE command and assigns the F: drive to the location where a
  57. user's frequently used program is kept. At that point, a user need
  58. only enter WMSTART to execute a batch file to load the program.
  59.  
  60.  
  61. Cautions
  62.  
  63. The Super_User should take care when using the Browser,
  64. since accidental erasure of system files would require re-installing
  65. the system, and possibly reformatting the NSS hard drive.
  66.  
  67.  
  68. About Bill
  69.  
  70. "Bill" is a fictional LANstep user. In our example, we're
  71. going to create a DOS startup script for him that automatically loads
  72. DOS after a valid login, then leaves Bill at his personal G: drive
  73. DOS prompt. Bill's USERID is BILL.
  74.  
  75.  
  76.  
  77. Creating a Login Script
  78.  
  79. Use these steps to create a login script for automatically
  80. loading DOS for Bill. Be sure you can login as Super_User.
  81.  
  82. Step 1:
  83.     Login as Super_User at the NSS, then move to the Support
  84.     Room.
  85.     
  86. Step 2:
  87.     Select the Browse Hard Disk 0 icon and press Enter, then select
  88.     System and press Enter.
  89.  
  90. Step 3:
  91.     Select userids and press Enter, then select BILL and press
  92.     Enter.
  93.  
  94. Step 4:
  95.     Select login and press F2 to display the startup script;
  96.     since there is no script, the screen will be blank. Press F5 to
  97.     edit, then enter the following line:
  98.  
  99.                !pcdos -0 {} {} {} */DOS/BOOT {} #user/DOS {} E:
  100.  
  101. Remember, LANstep is case sensitive, so be sure you type the line as 
  102. shown.
  103.  
  104. This script command tells LANstep to automatically run DOS immediately 
  105. after the specified user (Bill) has completed a valid login. Here's a
  106. breakdown of each component of the command:
  107.  
  108.  
  109. Element        Description
  110.  
  111. !pcdos          starts the activity called "pcdos"
  112. -0              uses all available "DOS" memory (lower 640K); this
  113.                 is a zero, not the letter "O"
  114. {}              Uses default printer for LPT1
  115. {}              Uses default printer for LPT2
  116. {}              Uses default printer for LPT3
  117. */DOS/BOOT      Sets path for drive E: to BOOT on the NSS
  118. {}              Sets Drive F: to be unmapped but still available
  119. #user/DOS       Sets G: to users personal DOS files
  120. {}              Drive H: is reserved for system use and is not mapped
  121. E:              Selects which drive is the BOOT drive, i.e, where
  122.                 DOS is loaded
  123.  
  124. Step 5:
  125.     Once the command is typed in, press F5 to save.
  126.  
  127.  
  128.  
  129. Testing The Script
  130.  
  131. Use this procedure when editing the script to test it
  132. instantly:
  133.  
  134. Step 1:
  135.     With the cursor on the script command line, press
  136.     Control-Space, then Control-Space again.
  137.  
  138. Step 2:
  139.     Press F2:START and the script is automatically executed.
  140.     This is an excellent way to test check the script's accuracy. If
  141.     you get an error message at the top of the screen, such as
  142.     "COMMAND," press Control-Escape. The cursor appears at the top of
  143.     the screen; move it to the word COMMAND and press Enter. You'll
  144.     see an explanation of the message. Recheck your typing. Remember,
  145.     the command line is case sensitive.
  146.  
  147. Note that during this test, G: will be mapped to the Super_User's
  148. personal files, not Bill's.
  149.  
  150. Step 3:
  151.     When at DOS prompt, type
  152.  
  153.             DOSEXIT
  154.  
  155.     and press Enter to go back to the startup script.
  156.  
  157.         
  158.  
  159.  
  160. Modifying AUTOEXEC.BAT
  161.  
  162. Each time DOS is loaded by a user, the common AUTOEXEC.BAT
  163. file (located on drive E:)is executed. While everyone uses the same
  164. AUTOEXEC.BAT, you can create an individual batch file for Bill which
  165. maps the F: drive to the location of his most frequently used
  166. application. When there, Bill needs to only enter the WMSTART command
  167. to execute the WMSTART.BAT batch file and load the application.
  168.  
  169. Use these steps to modify the common (on drive E:) AUTOEXEC.BAT to
  170. echo a reminder, then run a second batch file (START.BAT, on Bill's
  171. drive G:) START.BAT only contains two lines, and uses the NETUSE
  172. command to assign drive F: to the directory where Bill's application
  173. is kept.
  174.  
  175. Step 1:
  176.     From the previous steps, press Escape to leave this screen,
  177.     then press F3:CLIMB three times. This will take you to the top
  178.     menu of the Browser.
  179.  
  180. Step 2:
  181.         Select DOS and press Enter. Select BOOT and press Enter.
  182.  
  183. Step 3:
  184.         Select AUTOEXEC.BAT and press F2:VIEW. Press F5:EDIT, and go
  185.         to the last line of the file.
  186.  
  187. Step 4:
  188.         Type in the following 2 lines, pressing Enter after each one:
  189.  
  190.            ECHO Type WMSTART to start the application.
  191.            START.BAT
  192.  
  193.         The ECHO line displays "Type WMSTART..." to remind Bill to type in
  194.         the standard WMSTART command to execute the batch file used to
  195.         load his frequently used application.
  196.  
  197. Step 5:
  198.         Press F5:SAVE key, then press Escape. You should now be at
  199.         the screen that is displaying the contents of the E: drive, with
  200.         all of the DOS files.
  201.  
  202.  
  203.  
  204. Finding an Application's Location and Creating START.BAT
  205.  
  206. START.BAT is a batch file that uses the NETUSE command to
  207. map drive F: to the directory of Bill's most frequently used
  208. application. You should create a START.BAT for every user who wants
  209. this mapping done.
  210.  
  211. To do this, first determine the directory location for each user's
  212. most-used application, then create a START.BAT batch file (on the
  213. user's drive G:) for each user.
  214.  
  215. Note: Keep in mind that an individual user's START.BAT can only map
  216. F: to a single directory, so  that directory should be the location
  217. of the application we want to start automatically for the user.
  218.  
  219.  
  220.  
  221. Finding an Application's Location
  222.  
  223. Use this procedure to locate the directory on the NSS where
  224. a loaded application is kept. You'll use this information to map that
  225. directory as the F: drive for a specific user.
  226.  
  227. Step 1:
  228.         From the previous steps, press F3:CLIMB, then select
  229.         installed_apps. Press F2:VIEW.
  230.  
  231.         This will display all of the installed applications and their
  232.         respective directories. For example, suppose the assisted INSTALL
  233.         program installed Smartcom Exec(r); one of the lines would read:
  234.  
  235.               Smartcom Exec Version 2.x|SCMEXC2X
  236.  
  237. Step 2:
  238.         If you have installed many applications, you may need to
  239.         scroll through the list by pressing the down cursor key. The first
  240.         half of the line is the application description as it appears on
  241.         the menu choice, and the part after the pipe ( | ) symbol is
  242.         the actual directory that it is installed in.
  243.  
  244.         For the remainder of this example, let's assume Bill uses
  245.         Microsoft Works frequently. When you select Microsoft Works 2.0 in
  246.         the list, it appears as :
  247.  
  248.               Microsoft Works 2.0|MWORKS20
  249.  
  250.         From this we know that the application resides in the directory
  251.         MWORKS20.
  252.  
  253.         Manually installed applications appear like this:
  254.  
  255.               Automenu|MAN00001
  256.  
  257. Step 3:
  258.         Find the other application(s) and accompanying directory(s),
  259.         and write them down. You'll need to know these names and locations
  260.         when you create START.BAT for other users.
  261.  
  262. Step 4:
  263.         Press Escape twice. Exit the Support Room, and enter the
  264.         Management Console by selecting it and pressing Enter.
  265.  
  266. Step 5:
  267.         Choose DOS Application Management, and press Enter. Select
  268.         Maintain Installed Applications, and press Enter. It does not
  269.         matter which application you have highlighted. We will not be
  270.         making any changes to the application itself.
  271.  
  272. Step 6:
  273.         Press F4:EDIT. Select Set Up Application For Users and press
  274.         Enter. Highlight the USERID BILL, and press Enter. DOS loads,
  275.         running AUTOEXEC.BAT, which tries to run the as yet non-existent
  276.         START.BAT, so ignore the "Bad Command or Filename" message that
  277.         DOS returns. When DOS starts, enter G: (this moves you to Bill's
  278.         G: drive) and then press Enter. From this point, you'll be at the
  279.         DOS prompt of Bill's G: drive.
  280.  
  281.  
  282.  
  283. Creating START.BAT
  284.  
  285. START.BAT can be configured three ways:
  286.  
  287. * to map F: to an application's directory and leave the user
  288.   at the DOS prompt
  289.  
  290. * to map F: to an application's directory then run the
  291.   WMSTART.BAT batch file to go ahead and load the application.
  292.  
  293. * to just run a CLS command, so the "Bad command or file name"
  294.   message is not seen.
  295.  
  296. Step 1:
  297.         From DOS, use the COPY from CONsole command to create
  298.         START.BAT in Bill's G: drive:
  299.  
  300.           COPY CON START.BAT e
  301.                 
  302.  
  303.         The cursor drops to the next line (no DOS prompt is shown), and
  304.         you should type these two lines, pressing Enter after each one:
  305.  
  306.           NETUSE F: */DOS/APPS/MWORKS20
  307.           F:
  308.  
  309. Step 2:
  310.         If you want START.BAT to stop here (leaving the user at
  311.         DOS), press Control-Z then Enter and START.BAT will be written to
  312.         disk. Otherwise, add this final line, then press Control-Z then
  313.         Enter to create START.BAT on the disk.
  314.  
  315.           WMSTART
  316.  
  317.         Once you've created the file, DOS displays a message "1 File(s)
  318.         copied." Remember to replace "MWORKS20" with the necessary
  319.         directory name for other START.BAT files created for other users
  320.         and their applications. Type DOSEXIT.
  321.  
  322.         When Bill next logs in, he is automatically taken to this
  323.         directory. If you don't create a START.BAT file for other users,
  324.         be sure they understand to ignore the
  325.  
  326.           Bad Command or Filename
  327.                 
  328.         message they see when first starting DOS. This happens since
  329.         AUTOEXEC.BAT tries to execute START.BAT in a user's directory,
  330.         when no START.BAT is there. If this is a problem, go ahead and
  331.         create a dummy START.BAT in each user's G:-mapped directory that
  332.         contains a single CLS (clear screen) statement:
  333.  
  334.           COPY CON START.BAT
  335.           CLS
  336.  
  337.         Then press Control-Z and Enter; START.BAT then just clears the
  338.         screen and leaves the user at the G: prompt.
  339.  
  340.  
  341.  
  342.  
  343. Avoid "Bad command.." by Updating AUTOEXEC.BAT
  344.  
  345. If you don't want a user to see the "Bad command or file
  346. name" error, you can further update AUTOEXEC.BAT to prevent this
  347. message from being seen. Here's a sample file:
  348.  
  349.         ECHO OFF
  350.         PATH E:\;E:\WMCMDS
  351.         USERDEV
  352.         PRINTEND /T:20 NUL
  353.         IF NOT EXIST F:WMSTART.BAT GOTO NEXT_STEP
  354.         F:
  355.         WMSTART
  356.         :NEXT_STEP
  357.         IF NOT EXIST G:START.BAT GOTO END
  358.         G:
  359.         START
  360.         :END
  361.         G:
  362.         ECHO To return to your room, type DOSEXIT and press enter.
  363.  
  364.  
  365.  
  366.  
  367. The Default Login Script
  368.  
  369. You can create a startup script that automatically runs an
  370. application, such as Automenu or Windows, each time a user logs in to
  371. the network. You can make this script work for all users, or just
  372. newly created ones. Here's how to do it:
  373.  
  374. Step 1:
  375.         From the NSS, login as Super_User; enter the Support room.
  376.  
  377. Step 2:
  378.         Start the Browse Hard Disk 0 Icon.
  379.  
  380. Step 3:
  381.         Choose system and press Enter; select userids and press
  382.         Enter. Finally, select Super_User and press Enter.
  383.  
  384.         The next step is where you determine if the script is to be used
  385.         for all users, or just ones created after the script is entered.
  386.  
  387.      --Step 4a:
  388.      |      To configure the script to run for *ALL* users, both
  389.      |      current and future, select system_defaults and press Enter.
  390. Pick |
  391. one--|
  392.      |
  393.      |
  394.      -- Step 4b:
  395.              To configure the script to run for users which are created
  396.              *AFTER* the script is entered, select model_defaults and press
  397.              Enter.
  398.  
  399. Step 5:
  400.         Select login and press Enter.
  401.         
  402. Step 6:
  403.         Press F5:EDIT.
  404.  
  405. Step 7:
  406.         Enter this line:
  407.  
  408.      !pcdos -0 {} {} {} */DOS/BOOT */DOS/APPS/MAN00001 #user/DOS {} E:
  409.  
  410. Step 8:
  411.         Press F5:SAVE.
  412.  
  413. Step 9:
  414.         Press Escape twice to exit to the Support Room
  415.  
  416. The Automenu program will automatically be executed for the selected
  417. users after a valid login.
  418.  
  419.  
  420.  
  421.  
  422. Hayes and Smartcom Exec are registered trademarks, and LANstep is a
  423. trademark of Hayes Micrcomputer Products, Inc.
  424.  
  425. Other trademarks appearing in this document are trademarks of the
  426. respective companies
  427.  
  428. (C) 1991 Hayes Microcomputer Products, Inc.
  429.  
  430.